home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.6 KB | 98 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWIdle.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWIDLE_H
- #define FWIDLE_H
-
- // ----- Foundation Includes -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWEXCLIB_H
- #include "FWExcLib.h"
- #endif
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CPart;
- class FW_CFrame;
- class ODDispatcher;
- class ODFrame;
-
- //========================================================================================
- // class FW_CIdler
- //========================================================================================
-
- class FW_CIdler
- {
- public:
- FW_DECLARE_AUTO(FW_CIdler)
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- FW_CIdler(FW_CPart* part, ODIdleFrequency frequency);
- FW_CIdler(FW_CFrame* frame, ODIdleFrequency frequency);
- ~FW_CIdler();
-
- //----------------------------------------------------------------------------------------
- // API
- //
- public:
- void SetIdleFrequency(Environment *ev, ODIdleFrequency frequency);
- FW_Boolean IsRegistered(Environment *ev) const;
-
- void RegisterIdle(Environment *ev, FW_Boolean state);
- void RegisterIdle(Environment *ev);
- void UnregisterIdle(Environment *ev);
-
- private:
- void PrivSetIdleFrequency(Environment *ev, ODIdleFrequency frequency);
- ODDispatcher* PrivGetDispatcher(Environment *ev) const;
- ODFrame* PrivGetRegisteredFrame(Environment *ev) const;
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_Boolean fRegistered;
- ODIdleFrequency fFrequency;
- FW_CPart* fPart;
- FW_CFrame* fFrame;
- };
-
- //========================================================================================
- // inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_CIdler::IsRegistered
- //----------------------------------------------------------------------------------------
-
- inline FW_Boolean FW_CIdler::IsRegistered(Environment*) const
- {
- return fRegistered;
- }
-
- #endif